import { createBrowserRouter, Navigate } from 'react-router-dom'
import App from '../App'
import Home from '../component/Home'
import Xun from '../component/xun/Xun'
import She from '../component/She'
// import My from '../component/My'
import Search from '../component/xun/Search'
import Xiang from '../component/xun/Xiang'
import Marketfair from '../component/fair/Marketfair'
import Login from '../component/Login/login'
import Mima from '../component/Login/Mima'
import Feiyigongfanf from '../component/Login/Feiyigongfanf'
import Gongf from '../component/Login/Gongf'
import Face from '../component/Login/ren'
import Zhuce from '../component/Login/Zhuce'




import Searchfair from '../component/fair/Searchfair'
import Cc from '../component/xun/Cc'
import StoreDetails from '../component/fair/StoreDetails'
import My from '../pages/My'
import Ding_Detail from '../pages/Ding_Detail'
import Detail_Edit from '../pages/Detail_Edit'
import Dai_fahuo from '../pages/Dai_fahuo'
import Shen_qing from '../pages/Shen_qing'
import Shen_hou from '../pages/Shen_hou'
import Address from '../pages/Address'
import Address_Add from '../pages/Address_Add'
import Guan_Zhu from '../pages/Guan_Zhu'
import Dong_Tai from '../pages/Dong_Tai'
import Cao_Gao from '../pages/Cao_Gao'
import Yu_Yue from '../pages/Yu_Yue'
import Yu_Yue_Detail from '../pages/Yu_Yue_Detail'
import Activity_Detail from '../pages/Activity_Detail'
import YouYuan_Hui from '../pages/YouYuan_Hui'
import CaiDingMI from '../pages/CaiDingMI'
import Cai_ding_mi_nei from '../pages/Cai_ding_mi_nei'
import Fei_yi from '../pages/Fei_yi'
import Ben_cao_GM from '../pages/Ben_cao_GM'
import Xia_YiTi from '../pages/Xia_YiTi'
import End_Youxi from '../pages/End_Youxi'
import Fei_Yi_Er from '../pages/Fei_Yi_Er'
import Fei_Yi_Ti_Jiao from '../pages/Fei_Yi_Ti_Jiao'
import Jian_da_Jx from  '../pages/Jian_da_Jx'
import Huati from '../component/Liu/Huati/Huati'
import Huati_xiang from '../component/Liu/Huati/Huati_xiang'
import Tiezi_xiang from '../component/Liu/Tiezi/Tiezi'
import Fei from '../component/xun/Fei'
import FeiXiang from '../component/xun/FeiXiang'
import Fabu from '../component/Liu/Fabu/Fabu'
import Selecthuati from '../component/Liu/Fabu/Select/Selecthuati'
import Xiaoxi from '../component/Liu/Xiaoxi/Xiaoxi'
import Tiezhu from '../component/Liu/Tiezhu/Tiezhu'
import Liaotian from '../component/Liu/Liaotian/Jiemian'
import JiFen from '../component/xun/JiFen'
import People from '../component/xun/People'
import Medal from '../component/xun/Medal'
import Help from '../component/xun/Help'
import Setup from '../component/xun/Setup'
import Secure from '../component/xun/Secure'
import Us from '../component/xun/Us'
import Gywm from '../component/xun/Gywm'
import YiJian from '../component/xun/Yijian'
import Ren from '../component/xun/Ren'
import Customer from '../component/fair/Customer'
import Comments from '../component/fair/Comments'
import Shop from '../component/fair/Shop'
import ShopDetails from '../component/fair/ShopDetails'
import ConcernShop from '../component/fair/ConcernShop'
import ShoppingCart from '../component/fair/ShoppingCart'
import SubOrder from '../component/fair/SubOrder'
import Pay from '../component/fair/Pay'
import Events from '../component/events/Events'
import EventsDetail from '../component/events/EventsDetail'
import EventsPay from '../component/events/EventsPay'
import Location from '../component/events/Location'
import AddEvent from '../component/events/AddEvent'
import Locationa from '../component/events/Locationa'
const router = createBrowserRouter([
    {
        path: '/app', element: <App />, children: [
            { path: '/app/home', element: <Home /> },
            { path: '/app/xun', element: <Xun /> },
            { path: '/app/she', element: <She /> },
            { path: '/app/my', element: <My /> }
        ]
    },
    { path: '/', element: <Navigate to={'/login'} /> },
    { path: '/login', element: <Login /> },
    { path: '/mima', element: <Mima /> },
    { path: '/feiyigongfanf', element: <Feiyigongfanf /> },
    { path: '/gongf', element: <Gongf /> },
    { path: '/face', element: <Face /> },
    { path: '/zhuce', element: <Zhuce /> },
    
    
    { path: '/search', element: <Search /> },
    { path: '/xiang', element: <Xiang /> },
    { path: '/marketfair', element: <Marketfair /> },
    { path: '/login', element: <Login /> },
    { path: '/searchfair', element: <Searchfair /> },
    { path: '/cc', element: <Cc /> },
    {path:'/storeDetails',element:<StoreDetails/>},
    // {path:'/location',element:<Location/>},
    { path: '/fei', element: <Fei /> },
    { path: '/feixiang', element: <FeiXiang /> },
    { path: '/jifen', element: <JiFen /> },
    { path: '/people', element: <People /> },
    { path: '/medal', element: <Medal /> },
    { path: '/help', element: <Help /> },
    { path: '/setup', element: <Setup /> },
    { path: '/secure', element: <Secure /> },
    { path: '/us', element: <Us /> },
    { path: '/gywm', element: <Gywm /> },
    { path: '/yijian', element: <YiJian /> },
    { path: '/ren', element: <Ren /> },
    {path:'/customer',element:<Customer/>},
    {path:'/comment',element:<Comments/>},
    {path:'/shop',element:<Shop/>},
    {path:'/shopDetails',element:<ShopDetails/>},
    {path:'/ConcernShop',element:<ConcernShop/>},
    {path:'/ShoppingCart',element:<ShoppingCart/>},
    {path:'/SubOrder',element:<SubOrder/>},
    {path:'/pay',element:<Pay/>},
    {path:'/events',element:<Events/>},
    {path:'/eventsDetails',element:<EventsDetail/>},
    {path:'/eventsPay',element:<EventsPay/>},
    {path:'/addEvent',element:<AddEvent/>},
    {path:'/locationa',element:<Locationa/>},
    //我的页面
    //  {
    //     path: '/',
    //     element: <My />,
    // },
    // 订单
    {
        path: '/ding_detail',
        element: <Ding_Detail />,
    },
    //订单详情
    {
        path: '/detail_edit/:id',
        element: <Detail_Edit />,
    },
    // 待发货
    {
        path: '/dai_fahuo',
        element: <Dai_fahuo />,
    },
    //申请售后 运输中
    {
        path: '/shen_qing',
        element: <Shen_qing />,
    },
    //申请售后 已送达
    {
        path: '/shen_hou',
        element: <Shen_hou />,
    },
    //地址
    {
        path: '/address',
        element: <Address />,
    },
    //地址添加
    {
        path: '/address_add',
        element: <Address_Add />,
    },
    //关注表
    {
        path: '/guan_zhu',
        element: <Guan_Zhu />,
    },
    //动态
    {
        path: '/dong_tai',
        element: <Dong_Tai />,
    },

    //草稿箱
    {
        path: '/cao_gao',
        element: <Cao_Gao />,
    },

    //我的预约
    {
        path: '/yu_yue',
        element: <Yu_Yue />,
    },
    //预约详情
    {
        path: '/yu_yue_detail/:id',
        element: <Yu_Yue_Detail />,
    },
    // 预约详情
    {
        path: '/activity_detail',
        element: <Activity_Detail />,
    },
    //游园会
    {
        path: '/youyuan_hui',
        element: <YouYuan_Hui />,
    },
    // 猜灯谜
    {
        path: '/caidengmi',
        element: <CaiDingMI />,
    },
    //猜灯谜内部页面
    {
        path: '/caidengmi_nei',
        element: <Cai_ding_mi_nei />,
    },

    //非遗知识问答
    {
        path: '/fei_yi',
        element: <Fei_yi />,
    },
    //本草纲目
    {
        path: '/ben_cao_gm',
        element: <Ben_cao_GM />,
    },
    //下一题
    {
        path: '/xia_yi_ti',
        element: <Xia_YiTi />,
    },
    //游戏结果 
    {
        path: '/end_youxi',
        element: <End_Youxi />,
    },
    //非遗问答二
    {
        path: '/fei_yi_er',
        element: <Fei_Yi_Er />,
    },
    //问答结果
    {
        path: '/fei_yi_ti_jiao',
        element: <Fei_Yi_Ti_Jiao />,
    },
    //答案解析
    {
        path: '/jian_da_jx',
        element: <Jian_da_Jx />,
    },
    //话题
    {
        path: '/huati',
        element: <Huati />
    },
    //话题详情
    {
        path: '/huati_xiang',
        element: <Huati_xiang />
    },
    //帖子详情
    {
        path: '/tiezi_xiang',
        element: <Tiezi_xiang />
    },
    //发布动态
    {
        path: '/fabu',
        element: <Fabu />
    },
    //选择话题
    {
        path: '/selecthuati',
        element: <Selecthuati />
    },
    //消息列表
    {
        path: '/xiaoxi',
        element: <Xiaoxi />
    },
    //帖子主页面
    {
        path: '/tiezhu',
        element: <Tiezhu />
    },
    //聊天页面
    {
        path: '/liaotian',
        element: <Liaotian />
    }
])

export default router